package common

import (
	"github.com/jinzhu/gorm"
)

//连接函数
func Connect() *gorm.DB {
	db, err := gorm.Open("postgres", " port=5432 user=postgres dbname=ManagementSystem password=123456 sslmode=disable")
	if err != nil {
		panic(err)
	}
	db.SingularTable(true)
	return db
}